Automatically move "old" messages from INBOX folder to "Inbox/Old"

Hello,

is there a possibility to automatically move older emails (7days+) to another folder (not archive mailbox).
There is a service account receiving couple emails everyday, and we wanna move older emails to another mailbox folder automatically  (without Outook running).

I cant find a server-side rule which can be applied.

There is a little posibility to use EWSMail module within powershell. But, its script based, isnt supported, could cause problems when migrating to another version of Exchange..   and it also doesnt support custom folder "Inbox/Old" - only predefined default folders.

Get-EWSMailMessage -Mailbox acc@domain.com -folder Inbox | ?{$_.sent -gt (get-date).adddays(-7)} | Move-EWSMailMessage -TargetFolder "JunkEMail"

Any ideas? 


  • Edited by Mekac Friday, May 29, 2015 6:11 AM
May 28th, 2015 2:03pm

Hi,

We can set an inbox rule to achieve this.

$date= (Get-date).adddays(-7)

New-InboxRule -Name Move -Mailbox MailboxName -MoveToFolder "MailboxName:\inbox\old" -ReceivedAfterDate $date

New-InboxRule

https://technet.microsoft.com/en-us/library/dd335170%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396

Best Re

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 3:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics